package JAVACORE_TRAINING.OOPS_CONCEPTS.INHERISTANCES;

class Parent02
{
    String name;
    public void details()
    {
        name = "Parent";
        System.out.println(name);
    }  
}

public class ReferingMethods extends Parent02 {
	String name;
	
    public void details()
    {
        super.details();	//calling Parent class details() method
        name = "Child";
        System.out.println(name);
    }
    
    public static void main(String[] args)
    {
    	ReferingMethods cobj = new ReferingMethods();
        cobj.details();
    }
}
